# -*- coding: utf-8 -*-
# @Time        :2024/10/13 下午3:41
# @Author      :文刀水寿
# @File        : 12_类型注解_Union联合类型注解.py
"""
 @Description :演示Union联合注解
"""
# 使用Union类型，必须先导包
from typing import Union

my_list: list[Union[int, str]] = [1, 2, "itheima", "itcast"]


def func(data: Union[int, str]) -> Union[int, str]:
    pass


func()
